package com.hx.datasouredemo.controller;

import com.hx.datasouredemo.dto.UserDto;
import com.hx.datasouredemo.entity.User;
import com.hx.datasouredemo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController {
    @Autowired
    private UserService userService;

    @RequestMapping("/select1")
    public List<User> select1() {
        List<User> users = userService.selectAll1();
        return users;
    }

    @RequestMapping("/select2")
    public List<User> select2() {
        List<User> users = userService.selectAll2();
        return users;
    }
}
